
var router = require('{com}/router');
var request = require('request');
var func = require('{pub}/function');
return {
    path:'/index/',
    entry:true,
    events:{

    },
    onInit:function(){
        
    },
    onAfter:function(){
        request.get('/user/getCurrent', {}, {
            200:function(res){
                if(res.data.user){
                    func.location('list');
                }else{
                    router.location('/login/')
                }
            },
            other:function(res){
                router.location('/login/')
            }
        }, null)
    }
}